import request from "@/utils/request";

// demo
export function demo(data) {
  return request({
    url: "/api/demo",
    method: "post",
    data,
  });
}
export function getToken() {
  return request({
    url: "/account/admin3",
    method: "get",
  });
}
export function getConfigWeb() {
  return request({
    url: "/configweb/index",
    method: "get",
  });
}
export function getColumn(data) {
  return request({
    url: "/itemcate/index",
    method: "get",
    params: data,
  });
}
export function getDynamic(data) {
  return request({
    url: "/article/index",
    method: "GET",
    params: data,
  });
}
/* 栏目和文章 */
export function getSort(params) {
  return request({
    url: "/article/sort",
    method: "get",
    params,
  });
}
/* 文章 */
export function getArticle(params) {
  return request({
    url: "/article/index",
    method: "get",
    params,
  });
}
// 获取文章info
export function getArticleInfo(id) {
  return request({
    url: "/article/info/" + id,
    method: "get",
  });
}
